Platform Explorer / Nuxeo Platform 2021.26

Operation Context.StartWorkflow (Start workflow)

Description

Starts the workflow with the given model id on the input documents. Returns back the input documents.The id of the created workflow instance is available under the "workflowInstanceId" context variable.@Since 5.7.2 you can set multiple variables on the workflow (before 5.8 only scalar types are supported). The variables are specified as key=value pairs separated by a new line.To specify multi-line values you can use a \ character followed by a new line.

Example:

description=foo bar
For updating a date, you will need to expose the value as ISO 8601 format, for instance :

Example:

title=The Document Title
issued=@{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)}

@since 5.9.3 and 5.8.0-HF10 you can also set variables of complex types, by submiting a JSON representation:

assignees = ["John Doe", "John Test"]

Operation id Context.StartWorkflow
Category Workflow Context
Label Start workflow
Requires Workflow
Since

Parameters

Name Description Type Required Default value
id string yes  
start boolean no true 
variables properties no  

Signature

Inputs document, documents
Outputs document, documents

Implementation Information

Implementation Class Class: org.nuxeo.ecm.platform.routing.core.api.operation.StartWorkflowOperation
Contributing Component org.nuxeo.ecm.platform.routing.operations

JSON Definition

{
  "id" : "Context.StartWorkflow",
  "label" : "Start workflow",
  "category" : "Workflow Context",
  "requires" : "Workflow",
  "description" : "Starts the workflow with the given model id on the input documents. Returns back the input documents.The id of the created workflow instance is available under the \"workflowInstanceId\" context variable.@Since 5.7.2 you can set multiple variables on the workflow (before 5.8 only scalar types are supported). The variables are specified as <i>key=value</i> pairs separated by a new line.To specify multi-line values you can use a \\ character followed by a new line. <p>Example:<pre>description=foo bar</pre>For updating a date, you will need to expose the value as ISO 8601 format, for instance : <p>Example:<pre>title=The Document Title<br>issued=@{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)}</pre><p> @since 5.9.3 and 5.8.0-HF10 you can also set variables of complex types, by submiting a JSON representation: <p><pre>assignees = [\"John Doe\", \"John Test\"]</pre></p>",
  "url" : "Context.StartWorkflow",
  "signature" : [ "document", "document", "documents", "documents" ],
  "params" : [ {
    "name" : "id",
    "description" : null,
    "type" : "string",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "start",
    "description" : null,
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "true" ]
  }, {
    "name" : "variables",
    "description" : null,
    "type" : "properties",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  } ]
}